<?php
/**
 * @author 
 * @copyright 2014
 */
 
class incModelMaps extends CI_Model
{
	function __construct(){
		parent::__construct('menus');
	}
	function getMap($route){
		if($route == 'home'){
			return "";
		}
		$child = $this->model->table('menus')
							->select('id,parent,name')
							->where('route',$route)
							->find();
		$parent = $this->model->table('menus')
							->select('id,parent,name')
							->where('id',$child->parent)
							->find();
		$menu = '<div class="fleft">'.$parent->name .'</div>';
		$menu.= '<div class="fleft fa fa-angle-right mleft10 mtop1"></div>';
		$menu.= '<div class="fleft">'.$child->name .'</div>';
		return $menu;
	}
}